<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019-03-28
 * Time: 下午 4:39
 */
namespace Model;
class SettingMod extends Mod
{
	public function __construct()
	{
		$this->_table = 'kuyuan_vbz_setting';
	}

	/**
	 * 设置参数
	 * @param $_data
	 * @return mixed
	 */
	public function set($_data)
	{
		global $_W;
		$_uniacid = $_W['account']['uniacid'];
		$_one = $this->findOne(array('uniacid'=>$_uniacid),array('id'));
		if($_one){
			return $this->update($_data,array('uniacid'=>$_uniacid));
		}else{
			$_data['uniacid'] = $_uniacid;
			return $this->insert($_data);
		}
	}
}